package com.eascs.spider.dsk.taskmanager;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TaskManager {

	private static Logger logger = LoggerFactory.getLogger(TaskManager.class);
	private static ExecutorService executors;
	private static TaskManager instance;
	
	public static TaskManager init(){
		executors = Executors.newFixedThreadPool(3);
		instance = new TaskManager();
		logger.info("任务管理器初始化完毕");
		return instance;
	}
	
	public static synchronized TaskManager getInstance(){
		return instance==null?init():instance;
	}
	
}
